package com.loubobooo.personal.blog.mapper.custom;

import com.loubobooo.personal.blog.entity.Category;
import com.loubobooo.personal.blog.entity.vo.ArticleVO;
import com.loubobooo.personal.blog.entity.vo.CategoryVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapperCustom {
	//查询分类总数
	public Integer countCategory(@Param(value = "status") Integer status);
	
	//获得分类列表
	public List<CategoryVO> listCategory(@Param(value = "status") Integer status);
	
	//根据分类id获得分类信息
	public CategoryVO getCategoryById(@Param(value = "status") Integer status, @Param(value = "id") Integer id);

	//获得含有该分类的文章列表
	public List<ArticleVO> listArticleWithCategoryByPage(@Param(value = "status") Integer status,
            @Param(value = "cateId") Integer cateId, @Param(value = "startPos") Integer startPos,
            @Param(value = "pageSize") Integer pageSize);

	//删除分类
	public void deleteCategory(Integer id) ;

	//根据父分类找子分类
	public List<CategoryVO> findChildCategory(@Param(value = "status") Integer status,
            @Param(value = "id") Integer id);

	//根据标签名获取标签
	public Category getCategoryByName(String name);

}



